Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RN][iOS] Improve Podspec dependencies and prepare support for multiple Apple platforms #41380

Merged
merged 7 commits into from Nov 17, 2023

Conversation

cipolleschi
Copy link
Contributor

Summary:

Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also this PR where I manually make MacOS work with use_framewroks!

These changes will make it possible to MacOS to specify a static variable which defines the supported RN platforms so that Cocoapods can create Frameworks and the relative HEADER_SEARCH_PATHS correctly

Changelog:

[Internal] - Improve Podspec dependencies and prepare support for multiple Apple platforms

Test Plan:

Tested locally on main, CircleCI stays green.

Summary:
Pull Request resolved: #41353

Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

In order to make the infra scalable and avoid a maintenance nightmare for macOS and future platform, we are introducing this function that should factor out the platforms from the generation of header search paths.

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51026356

fbshipit-source-id: 7cf03601d94d7680f3fdfcaf52b2fd6bcd48c5b4
Summary:
Pull Request resolved: #41354

In order to make the infra scalable and avoid a maintenance nightmare for macOS and future platform, we are introducing this function that automate adding a dependency to a podspec and it generates the required search paths.

## Context
Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51027343

fbshipit-source-id: 33ac4c07112eacb08067220397e38db0a19240fb
…AppDelegate (#41355)

Summary:
Pull Request resolved: #41355

This change expose a new API to react_native_pod to add dependencies that automatically configure their search paths when using frameworksa and with multiple Apple platforms.
It also migrates React-RCTAppDelegate to this new mechanism to test that it works.

## Context
Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51029484

fbshipit-source-id: 77dfe85419d495f7327a2f484d33f9ed8701e00d
Summary:
Pull Request resolved: #41356

React-Core does not depends on any bit of ReactCommon, React-RCTFabric or React-NativeModuleApple, so I'm cleaning that up.

## Context
Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51030115

fbshipit-source-id: f87dbfe99e90d52cf8c07057be22cd024e38db42
Summary:
Pull Request resolved: #41357

This change migrate React-RCTBlob to the new add_dependency to improve its compatibility with macOS and to remove some maintenance burden.

## Context
Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51030365

fbshipit-source-id: c4b9037d6d0223052d659c04a1f494508944ed2a
…41358)

Summary:
Pull Request resolved: #41358

This change expose a missing function to create Header Search Paths when a podspec can't depend on another one explicitly.
This also migrate the ruby code to this new function.

## Context
Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

## Changelog:
[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51068390

fbshipit-source-id: ba9e09cd2f0671a9f3f00cc72496a0d5682eeb90
Summary:
Pull Request resolved: #41359

This change migrates the remaining podspecs to the new functions, so we do not depend on hardcoded values anymore and we can scale the solution to other platforms.

Last week I helped macOS to work with static framework.
When multiple platforms are specified, frameworks are build in two variants, the iOS and macOS one.

This break all the HEADER_SEARCH_PATHS as now we have to properly specify the base folder from which the search path is generated.
See also [this PR](microsoft#1967) where I manually make MacOS work with `use_framewroks!`

[Internal] - Add helper function to create header_search_path

Reviewed By: shwanton

Differential Revision: D51068403

fbshipit-source-id: 4c0455543363ccf4272d5e8590a7c663d9c33e8b
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 8, 2023
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 8,518,630 -9,123,217
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 9,756,809 -11,264,800
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 47f773e
Branch: main

mikehardy added a commit to mikehardy/rnfbdemo that referenced this pull request Nov 8, 2023
Copy link
Contributor

@mikehardy mikehardy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This passes the integration test I use which highlighted the previous catalyst + use_frameworks compile issue - mikehardy/rnfbdemo@2866aae - excellent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner Pick Request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants